The evapoRe package developed as part of the ITHACA
project at the Faculty of Environmental Sciences, Czech University of
Life Sciences Prague, Czechia. Its primary purpose is to facilitate the
download, exploration, visualization, and analysis of evapotranspiration
(ET) data. Additionally, evapoRe offers the functionality to calculate
various Potential EvapoTranspiration (PET) methods.
Like many other R packages, evapoRe has some system
requirements:
evapoRe database hosts 10 different ET data sets; one
satellite-based, four reanalysis, and five hydrological model products.
Their native specifications, as well as links to their providers, and
their respective references are detailed in the following subsections.
We have already homogenized, compacted to a single file, and stored them
in a Zenodo
repository under the following naming convention:
<data set>_<variable>_<units>_<coverage>_<start date>_<end date>_<resolution>_<time step>.nc
The evapoRe data collection was homogenized to these
specifications: * <variable> = Actual
evapotranspiration (e) * <units> = millimeters (mm) *
<resolution> = 0.25° * <time step>
= monthly
E.g., ERA5 (Hersbach et al. 2020) would be:
era5_e_mm_global_195901_202112_025_monthly.nc
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| GLEAM V3.0 | 0.25° | x | Monthly | 1980/01-2021/12 | Download | Martens et al. (2017) |
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| ERA5-Land | 0.1° | x | Monthly | 1960/01-2022/12 | Download | Muñoz-Sabater et al. (2021) | ||
| ERA5 | 0.25° | x | x | x | Monthly | 1959/01-2021/12 | Download | Hersbach et al. (2020) |
| JRA-55 | 1.25° | x | Monthly | 1958/01-2021/12 | Download | Kobayashi et al. (2015) | ||
| MERRA-2 | 0.5° x 0.625° | x | Monthly | 1980/01-2023/01 | Download | Gelaro et al. (2017) |
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| FLDAS | 0.1° | x | Monthly | 1982/01-2022/12 | Download | McNally et al. (2017) | ||
| GLDAS CLSM V2.1 | 1° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) | ||
| GLDAS NOAH V2.1 | 0.25° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) and Beaudoing and Rodell (2020) | ||
| GLDAS VIC V2.1 | 1° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) | ||
| TerraClimate | 4\(km\) | x | Monthly | 1958/01-2021/12 | Download | Abatzoglou et al. (2018) |
In this introductory recipe we will first download the FLDAS data set. We will then subset the downloaded data over Central Europe for the 2001-2010 period, and crop it to the national scale for Czechia. In the next step, we will generate time series for our data sets and conclude with the visualization of our data.
NOTE: While the functions in evapoRe
are intended to work directly with its data inventory. It can handle
most other ET data sets in “.nc” format, as well as any other “.nc” file
generated by its functions.
devtools::install_github("AkbarR1184/evapoRe")
library(evapoRe)Downloading the entire data collection or only a few data sets is
quite straightforward. You just call the download_data
function, which has four arguments name, destination,
domain, and time_res.
Let’s download the fldas data set and inspect its content with
show_info:
download_data(name = 'fldas')
fldas_global <- raster::brick('fldas_e_mm_land_198201_202212_025_monthly.nc')
show_info(fldas_global)[1] "class : RasterBrick "
[2] "dimensions : 720, 1440, 1036800, 492 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : fldas_e_mm_land_198201_202212_025_monthly.nc "
[7] "names : X1982.01.01, X1982.02.01, X1982.03.01, X1982.04.01, X1982.05.01, X1982.06.01, X1982.07.01, X1982.08.01, X1982.09.01, X1982.10.01, X1982.11.01, X1982.12.01, X1983.01.01, X1983.02.01, X1983.03.01, ... "
[8] "Date/time : 1982-01-01, 2022-12-01 (min, max)"
[9] "varname : e "
Once we have downloaded our database, we can start processing the data with:
subset_spacetime to subset the data in time and
space.subset_space to subset the data to the region of
interest.subset_time to select the years of interest.mon_to_year to aggregate the data from monthly into
annual.rescale_data to go from the native resolution (0.25°)
to coarser ones (e.g., 0.5°, 1°, 1.5°, 2°, etc).make_ts to generate a time series by taking the area
weighted average over each time step.To subset our data to a desired region and period of interest, we use
the subset_spacetime function, which has four arguments
data, years, bbox, and autosave.
Let’s subset the fldas data set over Central Europe (2,28,42,58) for
the 1981-2020 period, and inspect its content with
show_info:
fldas_subset <- subset_spacetime(fldas_global, years = c(2001, 2010), bbox = c(2,28,42,58))
show_info(fldas_subset)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : -3.7794194221, -0.4208407104, -0.5045991540, -0.0572454371, -0.0005709816, 0.0000000000, 0.0000000000, 0.0000000000, -0.3487000465, -1.6532191038, -0.4017279446, -2.5777058601, -2.6171388626, -0.3143836856, -0.2774783075, ... "
[9] "max values : 56.90099, 69.52248, 113.14240, 125.60358, 174.75136, 190.40407, 189.30975, 155.39180, 99.69257, 76.16212, 62.63054, 47.89834, 40.91222, 68.70403, 99.67541, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
To further crop our data to a desired polygon other than a rectangle,
we use the crop_data function, which has three arguments
x, shp_path, autosave.
Let’s crop our fldas subset to cover only Czechia with the respective
shape
file, and inspect its content with show_info:
fldas_cz <- crop_data(fldas_subset, shp_path = "gadm41_CZE_0.shp")
show_info(fldas_cz)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : 2.8995819, 0.3797975, 3.0552430, 2.6468999, 2.3843012, 8.8729420, 10.6661291, 6.5048337, 3.1765358, 1.2650596, 2.0705938, 4.3670325, 8.1393061, 2.2920027, 1.8019267, ... "
[9] "max values : 19.11826, 33.55016, 46.44899, 67.51703, 154.64659, 127.61076, 148.00507, 130.79279, 60.39583, 39.82825, 25.54001, 22.27194, 30.96886, 35.84626, 53.87944, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
First we need to download temperature data. To to this we will use terraclimate temperature data from the Zenodo repository:
variable is the variable name in which t stands
for tavg, tmin, and tmax.
download_terraclimate(variable = "t", folder_path = ".")This will returns terraclimate temperature data in following name convention e.g.,
terraclimate_tavg_land_19580101_20221231_025_monthly.nc
pet_calc function is calculating PET from various
method. “hs” for Hargreaves Samani method (Hargreaves and Samani 1982), “od” for
Oudin method (Oudin et al. 2005), “mb” for McGuinness
and Bordne method (McGuinness and
Bordne 1972), “jh” for Jensen Haise method (Jensen and Haise 1963), and “br” for
Baier and Robertson (Baier and Robertson
1965).
tavg_brick <- raster::brick("terraclimate_tavg_land_19580101_20221231_025_monthly.nc")
pet_oudin_global <- pet_calc(method = "od", tavg = tavg_brick)
show_info(pet_oudin_global)[1] "class : RasterBrick "
[2] "dimensions : 720, 1440, 1036800, 780 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 +no_defs "
[6] "source : memory"
[7] "names : X1958.01.01, X1958.02.01, X1958.03.01, X1958.04.01, X1958.05.01, X1958.06.01, X1958.07.01, X1958.08.01, X1958.09.01, X1958.10.01, X1958.11.01, X1958.12.01, X1959.01.01, X1959.02.01, X1959.03.01, ... "
[8] "min values : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... "
[9] "max values : 211.0769, 183.8832, 180.3431, 181.3188, 208.0041, 219.7289, 233.0501, 226.3481, 191.6451, 182.9314, 191.2556, 208.2998, 216.5920, 182.6839, 189.2202, ... "
[10] "Date/time : 1958-01-01, 2022-12-01 (min, max)"
To make a time series out of our data, we use the
make_ts function, which has two arguments data,
and autosave.
Let’s generate the time series for our three different fldas data sets (Global, Central Europe, and Czechia), and inspect its first 12 rows:
fldas_global_ts <- make_ts(fldas_global, name="fldas")
head(fldas_global_ts, 12) date value name type
1: 1982-01-01 40.01818 FLDAS Model forcing
2: 1982-02-01 39.05691 FLDAS Model forcing
3: 1982-03-01 45.63258 FLDAS Model forcing
4: 1982-04-01 48.38817 FLDAS Model forcing
5: 1982-05-01 56.04541 FLDAS Model forcing
6: 1982-06-01 59.48527 FLDAS Model forcing
7: 1982-07-01 63.42378 FLDAS Model forcing
8: 1982-08-01 58.08678 FLDAS Model forcing
9: 1982-09-01 47.53051 FLDAS Model forcing
10: 1982-10-01 43.30959 FLDAS Model forcing
11: 1982-11-01 39.14826 FLDAS Model forcing
12: 1982-12-01 39.41859 FLDAS Model forcing
fldas_subset_ts <- make_ts(fldas_subset, name="fldas")
head(fldas_subset_ts, 12) date value name type
1: 2001-01-01 14.47523 FLDAS Model forcing
2: 2001-02-01 24.55700 FLDAS Model forcing
3: 2001-03-01 43.77176 FLDAS Model forcing
4: 2001-04-01 61.23033 FLDAS Model forcing
5: 2001-05-01 112.55881 FLDAS Model forcing
6: 2001-06-01 114.57058 FLDAS Model forcing
7: 2001-07-01 116.47619 FLDAS Model forcing
8: 2001-08-01 79.83941 FLDAS Model forcing
9: 2001-09-01 50.78079 FLDAS Model forcing
10: 2001-10-01 32.62168 FLDAS Model forcing
11: 2001-11-01 20.41700 FLDAS Model forcing
12: 2001-12-01 13.59456 FLDAS Model forcing
fldas_cz_ts <- make_ts(fldas_cz, name = "fldas")
head(fldas_cz_ts, 12) date value name type
1: 2001-01-01 12.23963 FLDAS Model forcing
2: 2001-02-01 23.80942 FLDAS Model forcing
3: 2001-03-01 36.08155 FLDAS Model forcing
4: 2001-04-01 50.36031 FLDAS Model forcing
5: 2001-05-01 105.76477 FLDAS Model forcing
6: 2001-06-01 95.73339 FLDAS Model forcing
7: 2001-07-01 99.95880 FLDAS Model forcing
8: 2001-08-01 80.05314 FLDAS Model forcing
9: 2001-09-01 42.28572 FLDAS Model forcing
10: 2001-10-01 24.04546 FLDAS Model forcing
11: 2001-11-01 15.01222 FLDAS Model forcing
12: 2001-12-01 12.39291 FLDAS Model forcing
Let’s generate the time series for our three different PET calculated by oudin method (Global, Central Europe, and Czechia), and inspect its first 12 rows:
pet_oudin_global_ts <- make_ts(pet_oudin)
head(pet_oudin_global_ts, 12) date value
1: 1958-01-01 61.30534
2: 1958-02-01 57.55157
3: 1958-03-01 69.26975
4: 1958-04-01 75.33172
5: 1958-05-01 88.64012
6: 1958-06-01 97.28295
7: 1958-07-01 107.45549
8: 1958-08-01 102.36428
9: 1958-09-01 86.36096
10: 1958-10-01 76.35980
11: 1958-11-01 64.49735
12: 1958-12-01 61.64263
pet_oudin_subset_ts <- make_ts(fldas_subset)
head(pet_oudin_subset_ts, 12) date value
1: 2001-01-01 6.537995
2: 2001-02-01 9.020948
3: 2001-03-01 23.816143
4: 2001-04-01 43.600781
5: 2001-05-01 86.532623
6: 2001-06-01 101.766002
7: 2001-07-01 130.146518
8: 2001-08-01 117.460246
9: 2001-09-01 66.214705
10: 2001-10-01 46.758231
11: 2001-11-01 13.947147
12: 2001-12-01 3.455045
pet_oudin_cz_ts<-make_ts(pet_oudin_cz)
head(pet_oudin_cz_ts, 12) date value
1: 2001-01-01 3.473700
2: 2001-02-01 6.930045
3: 2001-03-01 19.420555
4: 2001-04-01 38.746838
5: 2001-05-01 85.328999
6: 2001-06-01 94.114641
7: 2001-07-01 120.078897
8: 2001-08-01 111.231710
9: 2001-09-01 58.833599
10: 2001-10-01 43.545129
11: 2001-11-01 10.677348
12: 2001-12-01 1.429517
Either after we have processed our data as required or right after downloaded, we have six different options to visualize our data for more information refer to visualisation section of pRecipe:
To see a map of any data set raw or processed, we use
plot_map which takes only one layer of the RasterBrick as
input.
plot_map(fldas_global[[1]])plot_map(pet_oudin_global[[1]])plot_map(pet_oudin_subset[[1]])plot_map(pet_oudin_subset[[1]])plot_map(fldas_cz[[1]])plot_map(pet_oudin_cz[[1]])To draw a time series generated by make_ts, we use any
of the options below, which takes only a make_ts “.csv”
generated file.
plot_line(fldas_global_ts, var = "Evapotranspiration")plot_line(fldas_subset_ts, var = "Evapotranspiration")plot_line(fldas_cz_ts, var = "Evapotranspiration")plot_line(pet_oudin_global_ts, var = "Evapotranspiration")plot_line(pet_oudin_subset_ts, var = "Evapotranspiration")plot_line(pet_oudin_cz_ts, var = "Evapotranspiration")plot_heatmap(fldas_global_ts)plot_heatmap(fldas_subset_ts)plot_heatmap(fldas_cz_ts)plot_heatmap(pet_oudin_global_ts)plot_heatmap(pet_oudin_subset_ts)plot_heatmap(pet_oudin_cz_ts)plot_box(fldas_global_ts, var = "Evapotranspiration")plot_box(fldas_subset_ts, var = "Evapotranspiration")plot_box(fldas_cz_ts, var = "Evapotranspiration" )plot_box(pet_oudin_global_ts, var = "Evapotranspiration")plot_box(pet_oudin_subset_ts, var = "Evapotranspiration")plot_box(pet_oudin_cz_ts, var = "Evapotranspiration" )plot_density(fldas_global_ts, var = "Evapotranspiration")plot_density(fldas_subset_ts, var = "Evapotranspiration")plot_density(fldas_cz_ts, var = "Evapotranspiration")plot_density(pet_oudin_global_ts, var = "Evapotranspiration")plot_density(pet_oudin_subset_ts, var = "Evapotranspiration")plot_density(pet_oudin_cz_ts, var = "Evapotranspiration")NOTE: For good aesthetics we recommend saving
plot_summary with
ggsave(<filename>, <plot>, width = 16.3, height = 15.03).
plot_summary(fldas_global_ts, var = "Evapotranspiration")
#plot_summary(fldas_subset_ts)
#plot_summary(fldas_cz_ts)plot_summary(pet_oudin_global_ts, var = "Evapotranspiration")
#plot_summary(pet_oudin_subset_ts)
#plot_summary(pet_oudin_cz_ts)We will introduce significant enhancements to ET database and PET calculation methods. This expansion builds upon our existing temperature-based approach and incorporates a radiation-based PET calculation methods, along with an expanded range of temperature-based methods. Our aim is to provide users with a more comprehensive and accurate estimation of ET and PET, catering to a broader range of applications and requirements.